﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SocOpros
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnyes_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Мы и не сомневались, что Вы так думаете!");
        }

        private void Btnno_MouseMove(object sender, MouseEventArgs e)
        {
            Btnno.Top -= e.Y; Btnno.Left += e.X;
            if (Btnno.Top < -10 || Btnno.Top > 100) Btnno.Top = 60;
            if (Btnno.Left < -80 || Btnno.Left > 250) Btnno.Left = 120; 
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void Form1_FormClosing(object sender,
FormClosingEventArgs e)
        {
            if (MessageBox.Show("Do you want to close", "SocOpros",
            MessageBoxButtons.YesNo, MessageBoxIcon.Question) ==
            System.Windows.Forms.DialogResult.Yes)
                Application.Exit();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
